Refresh visual theme foundation#606
Refresh visual theme foundation#606gioalex07 wants to merge 5 commits intoVREMSoftwareDevelopment:mainfrom
Conversation
|
Thanks for the contribution.
Please update the PR with real‑device testing details so review can continue. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #606 +/- ##
=========================================
Coverage 97.83% 97.83%
Complexity 975 975
=========================================
Files 121 121
Lines 2581 2581
Branches 211 211
=========================================
Hits 2525 2525
Misses 19 19
Partials 37 37 🚀 New features to boost your workflow:
|
AI Usage Disclosure
How was this tested?
|
There was a problem hiding this comment.
Pull request overview
Refreshes the app’s UI foundation by moving to a Material 3 DayNight-based theme, introducing a semantic light/dark color palette, and updating core container/navigation layouts to improve surface consistency and selection styling.
Changes:
- Updated base themes and added Material-styled widget overrides (toolbar, bottom nav, navigation view).
- Introduced a semantic color system with new light + night palettes.
- Refreshed main shell layouts and navigation selection drawables for updated surfaces/selection states.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/styles.xml | Moves to Material3 DayNight theme foundation and defines app widget styles. |
| app/src/main/res/values/colors.xml | Replaces legacy colors with a semantic palette for light mode. |
| app/src/main/res/values-night/colors.xml | Adds semantic palette overrides for night mode. |
| app/src/main/res/layout/main_toolbar.xml | Updates toolbar container surfaces/padding and app bar styling. |
| app/src/main/res/layout/main_navigation.xml | Updates drawer header background/padding and header text color. |
| app/src/main/res/layout/main_content.xml | Adjusts main layout sizing and backgrounds; updates bottom nav background usage. |
| app/src/main/res/layout/main_connection.xml | Updates connection panel surface and spacing/divider styling. |
| app/src/main/res/layout/main_activity.xml | Sets activity root/drawer backgrounds for new surface palette. |
| app/src/main/res/drawable/navigation_drawer_item_background.xml | Adds new checked-item background with inset + rounded container. |
| app/src/main/res/drawable/menu_selector.xml | Updates nav icon/text tint selector to use theme attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:layout_height="match_parent" | ||
| android:background="@color/background" | ||
| android:orientation="vertical"> |
There was a problem hiding this comment.
The layout background is hardcoded to @color/background. This will override the theme’s android:windowBackground and can prevent ThemeBlack from rendering true black surfaces (since @color/background resolves to the day/night surface). Prefer using a theme attribute (?attr/colorSurface/?android:attr/colorBackground) so theme overrides control the actual background.
| android:layout_height="0dp" | ||
| android:layout_weight="1" | ||
| android:background="@color/background" | ||
| android:orientation="vertical" |
There was a problem hiding this comment.
This container also hardcodes @color/background, which can fight the theme’s surface colors (notably the black theme) and makes future theme tweaks harder. Prefer a theme attribute background so ThemeBase/ThemeBlack can control the surface consistently.
|
|
||
| <style name="ThemeSystemNoActionBar" parent="ThemeSystem" /> | ||
|
|
||
| <style name="ThemeOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> |
There was a problem hiding this comment.
ThemeOverlay is based on ThemeOverlay.AppCompat.Dark.ActionBar, but the app theme is now Theme.Material3.*. This overlay can override text/icon colors in the toolbar subtree and lead to incorrect contrast (e.g., dark overlay colors on a light surface). Consider switching this overlay to an equivalent Material3 overlay (or removing it and letting toolbarStyle control colors) to keep theming consistent.
| <style name="ThemeOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> | |
| <style name="ThemeOverlay" parent="ThemeOverlay.Material3.ActionBar" /> |
| <item name="android:background">@color/surface_container</item> | ||
| <item name="titleTextColor">@color/on_surface</item> | ||
| <item name="subtitleTextColor">@color/on_surface_variant</item> | ||
| <item name="navigationIconTint">@color/on_surface</item> |
There was a problem hiding this comment.
Widget.WiFiAnalyzer.Toolbar sets navigationIconTint, but the layout uses androidx.appcompat.widget.Toolbar (not MaterialToolbar), so this tint attribute will be ignored and nav/overflow icons may end up with the wrong color under the new light surfaces. Consider switching the view to com.google.android.material.appbar.MaterialToolbar (or remove/replace the tint approach) so the icon tinting and Material3 theming work as intended.
| <item name="navigationIconTint">@color/on_surface</item> |
| <com.google.android.material.appbar.AppBarLayout | ||
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:background="?attr/colorSurface" | ||
| android:elevation="0dp" | ||
| android:theme="@style/ThemeOverlay"> | ||
|
|
||
| <androidx.appcompat.widget.Toolbar | ||
| android:id="@+id/toolbar" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="?attr/actionBarSize" /> | ||
| android:layout_height="?attr/actionBarSize" | ||
| android:paddingStart="@dimen/activity_horizontal_margin" | ||
| android:paddingEnd="@dimen/activity_horizontal_margin" /> |
There was a problem hiding this comment.
android:theme is set to @style/ThemeOverlay (an AppCompat dark action bar overlay) while the toolbar/AppBar now uses a light colorSurface background. This combination can force light/white toolbar icons and menu text on a light surface. Consider using a Material3 toolbar overlay (or removing the overlay) and/or switching to MaterialToolbar so icon/text colors are derived from colorOnSurface.
| android:insetLeft="12dp" | ||
| android:insetTop="4dp" | ||
| android:insetRight="12dp" |
There was a problem hiding this comment.
This drawable uses insetLeft/insetRight, which won’t mirror in RTL layouts even though the app enables RTL (supportsRtl=true). Use insetStart/insetEnd so selection insets are correct for RTL users.
| android:insetLeft="12dp" | |
| android:insetTop="4dp" | |
| android:insetRight="12dp" | |
| android:insetStart="12dp" | |
| android:insetTop="4dp" | |
| android:insetEnd="12dp" |
| android:paddingStart="@dimen/activity_horizontal_margin" | ||
| android:paddingEnd="@dimen/activity_horizontal_margin" | ||
| android:text="@string/app_full_name" | ||
| android:textColor="@color/on_surface" |
There was a problem hiding this comment.
This header title hardcodes @color/on_surface. Since ThemeBlack overrides the theme’s colorOnSurface, using a fixed resource here can make the black theme inconsistent. Prefer android:textColor="?attr/colorOnSurface" (or a theme attribute) so the text adapts to the active theme overrides.
| android:textColor="@color/on_surface" | |
| android:textColor="?attr/colorOnSurface" |
| android:id="@+id/drawer_layout" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| android:background="@color/background" |
There was a problem hiding this comment.
Setting the root background to @color/background makes the activity surface use the day/night palette even when ThemeBlack is selected. Since ThemeBlack overrides colorSurface/windowBackground to true black, consider using a theme attribute here (e.g. ?attr/colorSurface / ?android:attr/colorBackground) instead of a fixed @color/* resource so the black theme remains actually black.
| android:background="@color/background" | |
| android:background="?attr/colorSurface" |
Summary
What does this implement/fix?
app/src/main/res/values/styles.xml.app/src/main/res/values/colors.xmlandapp/src/main/res/values- night/colors.xml.app/src/main/res/layout/main_activity.xmlapp/src/main/res/layout/main_content.xmlapp/src/main/res/layout/main_toolbar.xmlapp/src/main/res/layout/main_navigation.xmlapp/src/main/res/layout/main_connection.xmlapp/src/main/res/drawable/menu_selector.xmlapp/src/main/res/drawable/navigation_drawer_item_background.xmlThis is a small and focused UI foundation change. It does not intentionally modify app logic, navigation behavior, or
Wi-Fi analysis functionality.
Does this close any issues?
How was this tested?
Summary
What does this implement/fix?
app/src/main/res/values/styles.xmlto use a Material 3 DayNight foundation whilepreserving the current XML/View-based architecture.
app/src/main/res/values/colors.xmlandapp/src/main/res/values- night/colors.xml.app/src/main/res/layout/main_activity.xmlapp/src/main/res/layout/main_content.xmlapp/src/main/res/layout/main_toolbar.xmlapp/src/main/res/layout/main_navigation.xmlapp/src/main/res/layout/main_connection.xmlapp/src/main/res/drawable/menu_selector.xml.app/src/main/res/drawable/navigation_drawer_item_background.xml.This is a small and focused visual foundation change. It does not modify app logic, navigation flow, or public APIs.
Does this close any issues?
How was this tested?
Example test commands: